home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / include / resolv.h < prev    next >
C/C++ Source or Header  |  1989-07-01  |  2KB  |  55 lines

  1. /*
  2.  * Copyright (c) 1983, 1987 Regents of the University of California.
  3.  * All rights reserved.  The Berkeley software License Agreement
  4.  * specifies the terms and conditions for redistribution.
  5.  *
  6.  *    @(#)resolv.h    5.5 (Berkeley) 5/12/87
  7.  */
  8.  
  9. #ifndef _RESOLV
  10. #define _RESOLV
  11.  
  12. /*
  13.  * Global defines and variables for resolver stub.
  14.  */
  15.  
  16.  
  17. #define    MAXNS        3        /* max # name servers we'll track */
  18. #define    MAXDNSRCH    3        /* max # default domain levels to try */
  19. #define    LOCALDOMAINPARTS 2        /* min levels in name that is "local" */
  20.  
  21. #define    RES_TIMEOUT    4        /* seconds between retries */
  22.  
  23. struct state {
  24.     int    retrans;         /* retransmition time interval */
  25.     int    retry;            /* number of times to retransmit */
  26.     long    options;        /* option flags - see below. */
  27.     int    nscount;        /* number of name servers */
  28.     struct    sockaddr_in nsaddr_list[MAXNS];    /* address of name server */
  29. #define    nsaddr    nsaddr_list[0]        /* for backward compatibility */
  30.     u_short    id;            /* current packet id */
  31.     char    defdname[MAXDNAME];    /* default domain */
  32.     char    *dnsrch[MAXDNSRCH+1];    /* components of domain to search */
  33. };
  34.  
  35. /*
  36.  * Resolver options
  37.  */
  38. #define RES_INIT    0x0001        /* address initialized */
  39. #define RES_DEBUG    0x0002        /* print debug messages */
  40. #define RES_AAONLY    0x0004        /* authoritative answers only */
  41. #define RES_USEVC    0x0008        /* use virtual circuit */
  42. #define RES_PRIMARY    0x0010        /* query primary server only */
  43. #define RES_IGNTC    0x0020        /* ignore trucation errors */
  44. #define RES_RECURSE    0x0040        /* recursion desired */
  45. #define RES_DEFNAMES    0x0080        /* use default domain name */
  46. #define RES_STAYOPEN    0x0100        /* Keep TCP socket open */
  47. #define RES_DNSRCH    0x0200        /* search up local domain tree */
  48.  
  49. #define RES_DEFAULT    (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
  50.  
  51. extern struct state _res;
  52. extern char *p_cdname(), *p_rr(), *p_type(), *p_class();
  53.  
  54. #endif /* _RESOLV */
  55.